package io.mybatis.example.springboot.model;

import io.mybatis.provider.Entity;
import org.apache.ibatis.type.JdbcType;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * sys_operate_log - 操作日志记录
 *
 * @author mkj
 */
@Getter
@Setter
@Entity.Table("sys_operate_log" remark = "操作日志记录", autoResultMap = true)
public class SysOperateLogDO {
  @Entity.Column(value = "oper_id", id = true, remark = "日志主键", updatable = false, insertable = false)
  private Long operId;

  @Entity.Column(value = "title", remark = "模块标题")
  private String title;

  @Entity.Column(value = "business_type", remark = "业务类型（0其它 1新增 2修改 3删除）")
  private Integer businessType;

  @Entity.Column(value = "method", remark = "方法名称")
  private String method;

  @Entity.Column(value = "request_method", remark = "请求方式")
  private String requestMethod;

  @Entity.Column(value = "operator_type", remark = "操作类别（0其它 1后台用户 2手机端用户）")
  private Integer operatorType;

  @Entity.Column(value = "oper_name", remark = "操作人员")
  private String operName;

  @Entity.Column(value = "dept_name", remark = "部门名称")
  private String deptName;

  @Entity.Column(value = "oper_url", remark = "请求URL")
  private String operUrl;

  @Entity.Column(value = "oper_ip", remark = "主机地址")
  private String operIp;

  @Entity.Column(value = "oper_location", remark = "操作地点")
  private String operLocation;

  @Entity.Column(value = "oper_param", remark = "请求参数")
  private String operParam;

  @Entity.Column(value = "json_result", remark = "返回参数")
  private String jsonResult;

  @Entity.Column(value = "status", remark = "操作状态（0正常 1异常）")
  private Integer status;

  @Entity.Column(value = "error_msg", remark = "错误消息")
  private String errorMsg;

  @Entity.Column(value = "oper_time", remark = "操作时间", jdbcType = JdbcType.TIMESTAMP)
  private Date operTime;

}
